<?php
namespace app\admin\controller\soft;
use app\admin\Adminbase;

class Group extends Adminbase
{
    
	//<!--  = 排序调整 =  -->
	//<!--  = /admin/soft/group/sortMove =  -->
	public function sortMove($moveId,$coverId){
		if( empty($moveId) )
			throw new \think\Exception('moveId参数不能为空');
		if( empty($coverId) )
			throw new \think\Exception('coverId参数不能为空');
		
		if($moveId==-1 || $coverId==-1){
			return $this->ReSucess("","操作成功");
		} 
		
		$result = model('SystemGroup')->updateSort($moveId,$coverId);
		if($result){
			return $this->ReSucess("","操作成功");
		}else{
			return $this->ReError("未知错误！");
		}
		
	}
	
	
	//<!--  = 排序调整 =  -->
	//<!--  = /admin/soft/group/getAction =  -->
	public function getAction($org_id){
		$result = model('SystemGroup')->where('org_id',$org_id)->value('action');
		return $this->ReSucess($result,"操作成功");
	}
	
}
